#pragma once

#include <windows.h>
class CMMLock
{
public:

    CMMLock(void)
    {
        InitializeCriticalSection(&m_Lock);
    }

    ~CMMLock(void)
    {
        DeleteCriticalSection(&m_Lock);
    }
public:
    void Lock()
    {
        EnterCriticalSection(&m_Lock);
    }
    void Unlock()
    {
        LeaveCriticalSection(&m_Lock);
    }
private:
    CRITICAL_SECTION m_Lock;
};

